package com.wgt.observer.java_impl;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by wgt on 2017/6/18.
 */
public class HJHOserver implements Observer{

    String name ;

    public HJHOserver(String name) {
        init(name);
    }
    
    public void init(String name){
        this.name = name;
    }

    public void update(Observable o, Object arg) {
        if (arg!=null){
            System.out.println(this.name+"获取到的对象属性是：{"+o.toString()+"},已经内容是："+arg.toString());
        }else{
        }
    }
}
